CC = cc

CFLAGS = -g -Wall -O0 -rdynamic -D_GUN_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64 -std=c99 
LDFLAGS = -L./../../lib/lich4/cb -llich4 -ldl -lsqlite3  -luuid -pthread -laio -lcrypt -lcrypto -lssl -lrt -lm
INCS = -I. -I./../include -I./../src/volume/ -I./../src/log/ -I./../src/wbuffer/ -I./../../lib/lich4/ylib/include -I./../src/rcache
SRCS =	 main.c \
		./../src/wbuffer/lsv_wbuffer.c  ./../src/wbuffer/lsv_wbuffer_thread.c ./../src/wbuffer/lsv_wbuffer_utils.c \
		./../src/rcache/lsv_rcache.c  \
		./../src/bitmap/lsv_bitmap.c ./../src/bitmap/lsv_bitmap_io.c ./../src/bitmap/lsv_bitmap_snap.c ./../src/bitmap/lsv_bitmap_cache.c\
		./../src/volume/lsv_volume.c ./../src/volume/lsv_volume_storage_file_impl.c ./../src/volume/lsv_volume_gc.c\
		./../src/log/lsv_log.c ./../src/log/lsv_log_thread.c  ./../src/log/lsv_log_gc.c 
		
OBJS = ${SRCS:.c=.o}
PROG = test_main

all:${PROG}
	

${PROG}:${OBJS}
	${CC} -o $@ ${notdir $^} ${LDFLAGS} ${CFLAGS}
	
.c.o:
	${CC} -c $< ${CPPFLAGS} ${CFLAGS} ${INCS}

.PHONY:clean

clean:
	rm -f ${PROG} ${notdir ${OBJS}} main_out
	